#ifndef _DATE_H_
#define _DATE_H_

class Date
{
public:
	Date(int yy = 1, int mm = 1, int dd = 1);
	static Date read();
	int getYear() const {
		return year;
	}
	int getMonth() const {
		return month;
	}
	int getDay() const {
		return day;
	}
	int getMaxDay() const;
	bool isLeapYear() const {
		return year % 4 == 0 && year % 100 != 0 || year % 400 == 0;
	}
	void show() const;
	int operator -(const Date& dt) const
	{
		return totalDays - dt.totalDays;
	}
	bool operator<(const Date& dt) const
	{
		return totalDays < dt.totalDays;
	}
private:
	int year, month, day;
	int totalDays;
};
#endif

